package com.example.staff.hub.entity;

import java.time.LocalDate;

/**
 * 员工实体类
 */
public class Staff {

    /**
     * 定义性别文本数组，用于表示性别信息
     */
    public static final String[] GENDER_TEXT = {"女", "男"};

    /**
     * 定义状态文本数组，用于表示员工的在职状态
     */
    public static final String[] STATUS_TEXT = {"离职", "在职"};

    /**
     * 用户唯一标识符
     */
    private String id;

    /**
     * 用户姓名
     */
    private String name;

    /**
     * 用户性别，0-女，1-男
     */
    private Integer gender;

    /**
     * 出生日期（ISO格式：yyyy-MM-dd）
     */
    private LocalDate dayOfBirth;

    /**
     * 联系电话（含国际区号，示例：+86-13800138000）
     */
    private String phone;

    /**
     * 电子邮箱地址
     */
    private String email;

    /**
     * 联系地址（包含省市区及详细地址）
     */
    private String address;

    /**
     * 用户状态，0-离职，1-在职
     */
    private Integer status;

    public Staff(String id, String name, Integer gender, LocalDate dayOfBirth, String phone, String email, String address, Integer status) {
        this.id = id;
        this.name = name;
        this.gender = gender;
        this.dayOfBirth = dayOfBirth;
        this.phone = phone;
        this.email = email;
        this.address = address;
        this.status = status;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public LocalDate getDayOfBirth() {
        return dayOfBirth;
    }

    public void setDayOfBirth(LocalDate dayOfBirth) {
        this.dayOfBirth = dayOfBirth;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "用户ID：" + id +
                ", 用户姓名：" + name +
                ", 用户性别：" + GENDER_TEXT[gender] +
                ", 出生日期：" + dayOfBirth +
                ", 联系地址：" + address +
                ", 联系电话：" + phone +
                ", 电子邮箱：" + email +
                ", 用户状态：" + STATUS_TEXT[status];
    }

}